/**
 * 请求结果返回对象
 *
 * @author lyj
 */

package com.ykzb.base.bean;

import java.io.Serializable;

import com.google.gson.Gson;

public class ResultBean implements Serializable {

    private static final long serialVersionUID = 3475946724048234071L;
    private boolean success = true;
    private String code;
    private String message;
    private Object data;

    public boolean getSuccess() {
        return success;
    }

    public void setSuccess(boolean value) {
        success = value;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String value) {
        code = value;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String value) {
        message = value;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object value) {
        data = value;
    }

    @Override
    public String toString() {
        return "ResultBean [success=" + success + ", code=" + code + ", message=" + message + ", data=" + data + "]";
    }

    public String toJson() {
        Gson gson = new Gson();
        return gson.toJson(this);
    }
}
